//
//  RZ_TableViewCell.swift
//  Pods
//
//  Created by eme on 2017/7/25.
//
//

import UIKit
import BrandonCore

class RZ_TableViewCell: UITableViewCell {
    
    
    @IBOutlet weak var applyForButton : UIButton!
    
    @IBOutlet weak var StatusLabel: UILabel!      //审核状态
    
    var status:String?{
        didSet{
            if case AppDataState.auditfailed = AppData.appState{
                StatusLabel.text = "认证资料审核失败"
                applyForButton.setTitle("查看详情 >>", for: .normal)
            }else if case .auditing = AppData.appState{
                StatusLabel.text = "认证资料审核中…"
                applyForButton.setTitle("查看详情 >>", for: .normal)
            }else if case .notAudit = AppData.appState{
                StatusLabel.text = "您还未认证,认证后购买商品!"
                applyForButton.setTitle("申请认证 >>", for: .normal)
            }
        }
    }

    override func awakeFromNib() {
        super.awakeFromNib()
        
        applyForButton.layer.borderColor = UIColor(hex:"e31436").cgColor
        applyForButton.layer.borderWidth = 1
        applyForButton.layer.cornerRadius = 3
        
        
        
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
    }

}
